import { h, init } from 'snabbdom'
import style from 'snabbdom/modules/style'
import eventlisteners from 'snabbdom/modules/eventlisteners'

let patch = init([style, eventlisteners])

let vnode = h('div#container', {
  style: {
    backgroundColor: 'red'
  },
  on: {
    click: () => console.log('clicked')
  }
}, [
  h('h1', 'hello snabbdom'),
  h('p', 'this is a p tag')
])

let app = document.querySelector('#app')

patch(app, vnode)
